import request from '@/utils/request.js'


export const getChannels = function () {
  return request({
    url: 'v1_0/user/channels',
    method: 'GET'
  })
}

export const getAllChannels = function () {
  return request({
    url: '/v1_0/channels',
    method: 'GET'
  })
}


export const addChannels = (channels) => {
  return request({
    url: '/v1_0/user/channels',
    method: 'PATCH',
    data: {
      channels: channels
    }
  })
}

export const delChannel = (channelId) => {
  return request({
    url: 'v1_0/user/channels/' + channelId, // 接口地址
    method: 'DELETE'
  })
}

